package h4tcp;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {
    public static void main(String[] args) throws IOException {


        ServerSocket ss=new ServerSocket(9999);

        Socket s=ss.accept();
//        InputStream is=s.getInputStream();
//        InputStreamReader isr=new InputStreamReader(is);
//        BufferedReader br=new BufferedReader(isr);
//
        BufferedReader br=new BufferedReader(new InputStreamReader(s.getInputStream()));
        String line;

        while((line=br.readLine())!=null)
        {

            System.out.println(line);
        }
        ss.close();
    }
}
